package com.ihr360.cnb.module.payroll.service;

import com.ihr360.cnb.module.payroll.service.fllback.IrenshiAttendanceDubboDubboProviderServiceFallback;
import com.ihr360.payroll.request.attendance.AttendanceOverTimeRequest;
import com.ihr360.payroll.request.attendance.AttendanceSyncRequest;
import com.ihr360.payroll.response.attendance.AttendanceBillSyncResponse;
import com.ihr360.payroll.response.attendance.AttendanceSyncResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Created by Eric on 2018/4/4/004.
 */
@FeignClient(name = "irenshi-attendance-dubbo-provider", fallback = IrenshiAttendanceDubboDubboProviderServiceFallback.class)
public interface IrenshiAttendanceDubboProviderService {

    @RequestMapping(value = "/attendanceSignSalaryController/getSignMonthlyReportInfoData", method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
    AttendanceSyncResponse getSignMonthlyReportInfoData(@RequestBody AttendanceSyncRequest syncRequest);

    @RequestMapping(value = "/attendanceSignSalaryController/getSignRecordInfoData", method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
    List<AttendanceBillSyncResponse> getSignRecordInfoData(@RequestBody AttendanceSyncRequest syncRequest);

    @RequestMapping(value = "/attendanceSignSalaryController/updateOvertimeBySalary",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
    void syncOvertimeData(@RequestBody AttendanceOverTimeRequest syncRequest);
}
